//Kyle Marshall
//Assignment 3
//marshaky@onid.oregonstate.edu
//cs362

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

//testing the shuffle function in dominion.c
int main (int argc, char** argv) {
  struct gameState G;
  int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, 
           sea_hag, tribute, smithy};
  int i;
  int seed = 1000;
  int returnCheck;

  memset(&G, 23, sizeof(struct gameState)); 
  
  initializeGame(2, k, seed, &G);
  //test up to the max number of cards in a deck
  for(i=1;i < 501;i++){
  	G.deckCount[0] = i;
  	returnCheck = shuffle(0,&G);
  	assert(returnCheck==0);
  }
  printf("Test passed for valid deck count\n");

 //testing for invalid deck size 
  G.deckCount[0] = 0;
  returnCheck = shuffle(0,&G);
  if(returnCheck == -1){
  	printf("Test passed for invalid deck count\n");
  }else{
  	printf("Test for invalid deck count failed\n");
  }

return 0;
}